MUL_TIME block

Short summary

Name

MUL_TIME

→POU type

→function

Category

IEC-block, Time

Conform to →IEC-standard

(error) currently restricted
(IEC demands error handling, if the result of the block exceeds the range of values for the output data type. See "No check of invalid connections" for the behavior in Neuron Power Engineer.)

Graphical interface

Available since

version 1.0.0 (for Neuron Power Engineer)

Functionality

The block multiplies the time value entered at input IN1 by a numerical value entered at input IN2 (=  IN1 * IN2). The block returns the product of this multiplication in format TIME.

No check of invalid connections

For some blocks, invalid connections are not checked by Neuron Power Engineer. Therefore, enter code in your application to detect invalid connections (e.g. IF-statements in the ST-code).

See "IEC-blocks for the application" for information what the consequences of an invalid connection might be.

An invalid connection due to →overflows might occur during a calculation using MUL_TIME. As your used →target system might influence the usage of →time literals in Neuron Power Engineer (see "Properties and restrictions specific to the target system"), an overflow might occur for different return values when using different target systems.

Inputs, return value

 

Identifier

→Data type

Description

Inputs:

IN1

TIME

time value

IN2

REALLREALUSINTUINTUDINTULINTSINTINTDINT or LINT
(corresponds to →generic data type ANY_NUM)

numerical value 

Return value:

TIME

 

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

The calculated values are evaluated by using the Assert block.

FUNCTION_BLOCK ExampleMulTime
  VAR
    product : TIME;
  END_VAR
  product := MUL_TIME(IN1 := T#1m40s, IN2 := 2.0);
 
  Assert(product = TIME#3m20s);
END_FUNCTION_BLOCK

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.